<table cellspacing="0" cellpadding="0" border="0" width="100%" style="margin-left: 10px; margin-bottom: 5px;">

        <tbody>

            <tr>

                <?php // if(common::check_permission("add","expense")){?>

                 <td align="left" colspan="2">

                     <a href="<?=site_url('EmailMarketing/add_emailmarketing_template')?>"><img border="0" align="absmiddle" alt="#" src="<?=base_url()?>images/add.gif.png"></a>

                     &nbsp;

                     <a href="<?=site_url('EmailMarketing/add_emailmarketing_template')?>">Email Marketing Template</a>

                 </td>

                 <?php //}?>

                 

            </tr>

        </tbody>

</table>

<!--Listing -->

<table cellspacing="0" cellpadding="0" border="0" width="100%" summary="Employee Pay Sheet" id="box-table-a">

    <tbody>

        <?php if($msg){?>

        <tr>

            <td colspan="10" align="left" style="color:green" class="msg">

                <?php echo $msg;?>

            </td>

        </tr>

        <?php }?>

        <tr>
				
				<th width="10%" scope="col">Type </th>
				
                <th width="10%" scope="col">Title </th>

                <th width="10%" scope="col">Action</th>
				
				<th width="10%" scope="col">Status</th>

            </tr>

             <?php if(isset($email_settings))

			{

				foreach($email_settings->result() as $email_setting)

				{ 

                ?>



            <tr>

				<td><?php echo ucfirst($email_setting->type); ?></td>
				
				
                <td><?php echo ucfirst($email_setting->title); ?></td>

               

                  <td><a class="edit_icon" title="Edit" href="<?=site_url('EmailMarketing/edit_emailmarketing_template/'.$email_setting->id)?>"></a>

			  

              <a class="delete2_icon" title="Delete" href="<?=site_url('EmailMarketing/delete_emailmarketing_template/'.$email_setting->id)?>" onclick="return confirm('Are you sure to delete this row?')"></a>

              </td>
			  
			  <td><?php if($email_setting->status == 1) { echo "Active"; } else { echo "InActive";}?></td>
			  

            </tr>

            <?php }}else{?>

            <tr>

                <td colspan="9" align="center">

                    No data found.

                </td>

            </tr>

            <?php }?>



            <tr>

                <td align="right" colspan="9" ><?php if($pagination_links){?>Go to page:<?php }?>

                  <ul class="yiiPager" id="yw0">

                     <?php echo $pagination_links;?>

                        </ul>

                </td>

            </tr>

    </tbody>

</table>
<script>
$(document).ready( function () {
    $(".collapse").collapse()({
      show: false
      });
});
</script>